﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace XingFuStudio.Pioneer.Applications.City.Shop {
    /// <summary>
    /// 灰色收入商店信息
    /// </summary>
    public class GrayShopInfo : ShopItem {
        /// <summary>
        /// 增加收入的时间时隔（分）
        /// </summary>
        public int TimeSpan {
            get;
            set;
        }

        /// <summary>
        /// 最大时间（分）
        /// </summary>
        public int MaxTime {
            get;
            set;
        }

        /// <summary>
        /// 最大收益
        /// </summary>
        public int MaxCash {
            get;
            set;
        }

        /// <summary>
        /// 初始化商品自身数据
        /// </summary>
        /// <param name="shopItems"></param>
        public override void InitShop(Dictionary<string, object> shopItems) {
            base.InitShop(shopItems);

            //this.Price = Convert.ToInt32((string)shopItems["price"]);
            this.TimeSpan = Convert.ToInt32((string)shopItems["timespan"]);
            this.MaxTime = Convert.ToInt32((string)shopItems["earningmaxtime"]);
            this.MaxCash = Convert.ToInt32((string)shopItems["calearning"]);
        }
    }
}
